package jdmx.framework.common.envelopes;

import jdmx.framework.common.Envelope;
import jdmx.library.da.Entity;
import jdmx.library.da.EntityList;
import jdmx.library.da.IdList;
import jdmx.library.da.Pager;
import jdmx.library.da.Sorter;
import jdmx.library.info.EntityInfo;

public class EnvelopeTyped extends Envelope {
	
	public EnvelopeTyped() {
		envelopeType = "typed";
	}

	/**
	 * EntityFilter
	 * 
	 * obiectul de filtrare de tip Entity
	 */
	public Entity getEntityFilter() { return (Entity) getItem("EntityFilter");	}
	public void setEntityFilter(Entity filter) { setItem("EntityFilter", filter); }
	
	/**
	 * EntityList
	 * 
	 * lista de entitati intoarse de "read"
	 * lista de entitati pentru "create"
	 * lista de entitati pentru "update"
	 */
	public EntityList getEntityList() { return (EntityList) getItem("EntityList");	}
	public void setEntityList(EntityList entityList) { setItem("EntityList", entityList); }
	
	/**
	 * IdList
	 * 
	 * lista de id-uri folosite la stergere 
	 */
	public IdList getIdList() { return (IdList) getItem("IdList");	}
	public void setIdList(IdList idList) { setItem("IdList", idList); }

	/**
	 * Pager
	 * 
	 * obiectul care stocheaza informatiile despre recordset
	 * - pagina curenta
	 * - dimensiunea paginii
	 * - nr. total de inregistrari
	 */
	public Pager getPager() { return (Pager) getItem("Pager");	}
	public void setPager(Pager pager) { setItem("Pager", pager); }
	
	/**
	 * Sorter
	 * 
	 * obiectul care stocheaza informatiile despre
	 * sortarea coloanelor in grid
	 */
	public Sorter getSorter() { return (Sorter) getItem("Sorter");	}
	public void setSorter(Sorter sorter) { setItem("Sorter", sorter); }

	/**
	 * EntityInfo
	 * 
	 * numele si namespace-ul entitatii
	 */
	public EntityInfo getEntityInfo() { return (EntityInfo) getItem("EntityInfo");	}
	public void setEntityInfo(EntityInfo entityInfo) { setItem("EntityInfo", entityInfo); }
}

